package com.xcc.factorypattern.demo03;

import java.util.ArrayList;

/**
 * @Description: Pizza
 * @Author: xiechuang
 * @Date: 2022/9/3
 */
public abstract class Pizza {

    String name;
    String dough;
    String sauce;

    ArrayList toppings = new ArrayList();

    public String getName() {
        return name;
    }

    /**
     * 准备
     */
    void prepare() {
        System.out.println("Preparing " + name);
        System.out.println("Tossing dough...");
        System.out.println("Adding sauce...");
        System.out.println("Adding toppings: ");
        for (Object topping : toppings) {
            System.out.println("   " + topping);
        }
    }

    /**
     * 烤
     */
    void bake() {
        System.out.println("Bake for 25 minutes at 350");
    }

    /**
     * 切
     */
    void cut() {
        System.out.println("Cutting the pizza into diagonal slices");
    }

    /**
     * 装盒
     */
    void box() {
        System.out.println("Place pizza in official PizzaStore box");
    }

}
